import { RouteRecordRaw } from "vue-router";

const router: Array<RouteRecordRaw> = [

    {
        path: '/main',
        name: "r_home",
        component: () => import("@/pages/Home.vue"),
        children: [
            {
                path: '',
                name: "r2",
                redirect: '/main/home',
            },
            {
                path: 'home',
                name: "r_home",
                component: () => import("@/pages/Welcome.vue"),
                // meta: {
                //     keepAlive: true //需要被缓存
                // }
            },
            {
                path: 'course',
                name: "r_course",
                component: () => import("@/pages/CourseList.vue")
            },
            {
                path: 'about',
                name: "r_about",
                component: () => import("@/pages/About.vue")
            },
            {
                path: 'user',
                name: "r_userlist",
                component: () => import("@/pages/UserList.vue")
            },
            {
                path: 'menu',
                name: "r_menu",
                component: () => import("@/pages/MenuManage.vue")
            },
            {
                path: 'score',
                name: "r_score",
                component: () => import("@/pages/ScoreManage.vue")
            },
            {
                path: 'jurisdiction',
                name: "r_jurisdiction",
                component: () => import("@/pages/PowerMange.vue")
            },
            {
                path: '*',
                component: () => import("@/pages/Home.vue")
            },
        ]
    }

];
export default router;
